/*
 * Common.h
 *
 *  Created on: Aug 26, 2011
 *      Author: ryan
 */

#ifndef COMMON_H_
#define COMMON_H_

#define MACHINES 1
#define INF 196608000
#define ERR 196608000
#define LIMIT 2
#define DMAX 765
#define BLOCK_NUM 16
#define THREAD_NUM 256
#define TOTAL BLOCK_NUM * THREAD_NUM
#define calculateTime(aled, alst)	(double)(aled.tv_sec - alst.tv_sec)+(double)(aled.tv_usec - alst.tv_usec)/1000000

typedef struct {
	unsigned char r;
	unsigned char g;
	unsigned char b;
} Color;

typedef struct accm{
	unsigned int dxx;
	unsigned int dxy;
	unsigned int dyx;
	unsigned int dyy;
	unsigned char x0;
	unsigned char y0;
}ACCM;

typedef struct point{
	unsigned int x, y;
	unsigned char x0, y0;
}POINT;

#endif /* COMMON_H_ */
